﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace KnowledgeBaseIntermediary
{
    /// <summary>
    /// Represents a State and holds lists of contained auto commands, scenes and manual commands.
    /// </summary>
    public class StateDTO
    {
        public enum PRIORITY { LOWEST, LOW, MEDIUM, HIGH, HIGHEST, ALERT };

        private String name;

        public String Name
        {
            get { return name; }
        }
        private OutputObject mOutputObject;

        public OutputObject OutputObject
        {
            get { return mOutputObject; }
        }
        private bool isChecked;
        public bool IsChecked
        {
            get { return isChecked; }
        }
        private bool immediatelySwitchToThisState;  //true if this state will not be enqueued but instead immediately switched to. This field is true if a state has just been dequeued and should thus not be enqueued a second time.

        public bool ImmediatelySwitchToThisState
        {
            get { return immediatelySwitchToThisState; }
            set { immediatelySwitchToThisState = value; }
        }
        private bool isConfirmed;   //True if Lisa has obtained permission to switch to this state, false otherwise

        public bool IsConfirmed
        {
            get { return isConfirmed; }
            set { isConfirmed = value; }
        }

        private PRIORITY priority;

        public PRIORITY Priority
        {
            get { return priority; }
        }
        private List<String> autoCommands = new List<String>();
        private List<String> scenes = new List<String>();
        private List<String> manualCommands = new List<String>();

        public StateDTO(String name, OutputObject outputObject, Boolean isChecked, PRIORITY priority, List<String> autoCommands, List<String> scenes, List<String> manualCommands)
        {
            this.name = name;
            this.mOutputObject = outputObject;
            this.isChecked = isChecked;
            this.immediatelySwitchToThisState = false;
            this.isConfirmed = false;
            this.priority = priority;
            this.autoCommands = autoCommands;
            this.scenes = scenes;
            this.manualCommands = manualCommands;
        }

        public List<String> getManualCommands()
        {
            return manualCommands;
        }

        public List<String> getAutoCommands()
        {
            return autoCommands;
        }

        public List<String> getScenes()
        {
            return scenes;
        }
    }

}